/**
 *添加行政区划
 */
'use strict';

const conn = require('../../libs/DB/Conn');
const operationRecord = require("../sys/operationRecordAction");

module.exports = async function (params) {
    let insertObj ={
        parent_id: params.parentId ? params.parentId : 0,
        district_name:params.districtName,
    }
    let insertSql = `INSERT INTO district_file SET ?`;
    await conn(insertSql, [insertObj]);
    await operationRecord(params);
    return { success: true };
};
